#include "BranchProfiler.h"
#include "Utils.h"

map<Instruction*, BranchProfiler*> BranchProfiler::ofInst;

BranchProfiler::BranchProfiler(BranchInst *Inst, void*) : Inst(Inst), Positive(0), Negative(0)
{
//	errs() << "Created BranchProfiler for " << *Inst << "\n";
	ofInst[Inst] = this;
}

void BranchProfiler::Profile(bool Result)
{
	if (Result)
		++Positive;
	else
		++Negative;
}
